第13步:当 dino 撞到流星时,我们也希望重置流星。我们先将其移动到一个随机角落。
- 在事件内部,使用 Random Choice 创建一个名为 x 的变量,带有列表 ([-230, 230])。
- 使用另一个 Random Choice 指令创建一个名为 y 的变量,带有列表 ([-230, 230])。
- 使用 Go To 来告诉 hit_sprite 移动到 (x,y)的位置。
现在每个流星将具有从 -230 到 230 的 x 坐标和从 -230 到 230的 y 坐标。
To navigate the page using the TAB key, first press ESC to exit the code editor.